package zisu.algorithm.algorithm.BST;

import zisu.algorithm.algorithm.BST.Set.BSTSet;

import java.util.ArrayList;

public class Test {
    public static void main(String[] args) {
        System.out.println("A tale of two city");
        ArrayList<String> word1 = new ArrayList<>();
        FileOperation.readFile("a-tale-of-two-cities.txt",word1);
        System.out.println("Total words:"+word1.size());

        BSTSet<String> set1 = new BSTSet<>();
        for(String word:word1){
            set1.add(word);
        }
        System.out.println("Total different words:"+set1.getSize());

        System.out.println("======================================================================");

        System.out.println("Pirde and Prejudice");
        ArrayList<String> word2 = new ArrayList<>();
        FileOperation.readFile("pride-and-prejudice.txt",word2);
        System.out.println("Total words:"+word2.size());

        BSTSet<String> set2 = new BSTSet<>();
        for(String word:word2){
            set2.add(word);
        }
        System.out.println("Total different words:"+set2.getSize());


    }
}
